<?php



$action=$_POST['act'];
//Login with facebook
if($action=='login_facebook'){

	
		$muser=new Model_User;
		$muser->where="email ='".$_POST['email']."'";
		$muser->get_user();
		if($muser->num_rows()>0){
			$row=$muser->fetchOne();
		
			//Update last login, ip, gan session,redirect HOME 
			user_login_facebook($row);
		}else{
			// Add user bằng Thông Tin facebook Account
			user_add_facebook($_POST);
			
		
		}
		
		
		
			
	
}


?>